package com.test.apiService.system.core;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

public abstract class BaseController extends Compact {

    protected Map<String,String> initUriVariables(HttpServletRequest request) {
        Enumeration<String> keys = request.getParameterNames();
        Map<String,String> data = new HashMap<>();
        while (keys.hasMoreElements()) {
            String key = keys.nextElement();
            data.put(key, request.getParameter(key));
        }
        return data;
    }
}
